Integrand size = 23, antiderivative size = 83 \[ \int \csc (e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx=-\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b} \cos (e+f x)}{\sqrt {a+b-b \cos ^2(e+f x)}}\right )}{f}-\frac {\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a+b-b \cos ^2(e+f x)}}\right )}{f} \]
-arctanh(cos(f*x+e)*a^(1/2)/(a+b-b*cos(f*x+e)^2)^(1/2))*a^(1/2)/f-arctan(c os(f*x+e)*b^(1/2)/(a+b-b*cos(f*x+e)^2)^(1/2))*b^(1/2)/f
Time = 0.20 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.19 \[ \int \csc (e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx=\frac {-\sqrt {a} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a} \cos (e+f x)}{\sqrt {2 a+b-b \cos (2 (e+f x))}}\right )+\sqrt {-b} \log \left (\sqrt {2} \sqrt {-b} \cos (e+f x)+\sqrt {2 a+b-b \cos (2 (e+f x))}\right )}{f} \]
(-(Sqrt[a]*ArcTanh[(Sqrt[2]*Sqrt[a]*Cos[e + f*x])/Sqrt[2*a + b - b*Cos[2*( e + f*x)]]]) + Sqrt[-b]*Log[Sqrt[2]*Sqrt[-b]*Cos[e + f*x] + Sqrt[2*a + b - b*Cos[2*(e + f*x)]]])/f
Time = 0.28 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.96, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3042, 3665, 301, 224, 216, 291, 219}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc (e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {a+b \sin (e+f x)^2}}{\sin (e+f x)}dx\) |
\(\Big \downarrow \) 3665 |
\(\displaystyle -\frac {\int \frac {\sqrt {-b \cos ^2(e+f x)+a+b}}{1-\cos ^2(e+f x)}d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 301 |
\(\displaystyle -\frac {b \int \frac {1}{\sqrt {-b \cos ^2(e+f x)+a+b}}d\cos (e+f x)+a \int \frac {1}{\left (1-\cos ^2(e+f x)\right ) \sqrt {-b \cos ^2(e+f x)+a+b}}d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 224 |
\(\displaystyle -\frac {a \int \frac {1}{\left (1-\cos ^2(e+f x)\right ) \sqrt {-b \cos ^2(e+f x)+a+b}}d\cos (e+f x)+b \int \frac {1}{\frac {b \cos ^2(e+f x)}{-b \cos ^2(e+f x)+a+b}+1}d\frac {\cos (e+f x)}{\sqrt {-b \cos ^2(e+f x)+a+b}}}{f}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle -\frac {a \int \frac {1}{\left (1-\cos ^2(e+f x)\right ) \sqrt {-b \cos ^2(e+f x)+a+b}}d\cos (e+f x)+\sqrt {b} \arctan \left (\frac {\sqrt {b} \cos (e+f x)}{\sqrt {a-b \cos ^2(e+f x)+b}}\right )}{f}\) |
\(\Big \downarrow \) 291 |
\(\displaystyle -\frac {a \int \frac {1}{1-\frac {a \cos ^2(e+f x)}{-b \cos ^2(e+f x)+a+b}}d\frac {\cos (e+f x)}{\sqrt {-b \cos ^2(e+f x)+a+b}}+\sqrt {b} \arctan \left (\frac {\sqrt {b} \cos (e+f x)}{\sqrt {a-b \cos ^2(e+f x)+b}}\right )}{f}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b} \cos (e+f x)}{\sqrt {a-b \cos ^2(e+f x)+b}}\right )+\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a-b \cos ^2(e+f x)+b}}\right )}{f}\) |
-((Sqrt[b]*ArcTan[(Sqrt[b]*Cos[e + f*x])/Sqrt[a + b - b*Cos[e + f*x]^2]] + Sqrt[a]*ArcTanh[(Sqrt[a]*Cos[e + f*x])/Sqrt[a + b - b*Cos[e + f*x]^2]])/f )
3.2.24.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] && !GtQ[a, 0]
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst [Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*(x_)^2)^(p_.)/((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[b/ d Int[(a + b*x^2)^(p - 1), x], x] - Simp[(b*c - a*d)/d Int[(a + b*x^2)^ (p - 1)/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[p, 0] && (EqQ[p, 1/2] || EqQ[Denominator[p], 4] || (EqQ[p, 2/3] && E qQ[b*c + 3*a*d, 0]))
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^ (p_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-ff/f Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]
Leaf count of result is larger than twice the leaf count of optimal. \(173\) vs. \(2(71)=142\).
Time = 1.01 (sec) , antiderivative size = 174, normalized size of antiderivative = 2.10
method | result | size |
default | \(\frac {\sqrt {\left (\cos ^{2}\left (f x +e \right )\right ) \left (a +b \left (\sin ^{2}\left (f x +e \right )\right )\right )}\, \left (\sqrt {b}\, \arctan \left (\frac {-2 b \left (\cos ^{2}\left (f x +e \right )\right )+a +b}{2 \sqrt {b}\, \sqrt {-b \left (\cos ^{4}\left (f x +e \right )\right )+\left (a +b \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}\right )-\sqrt {a}\, \ln \left (\frac {-\left (a -b \right ) \left (\cos ^{2}\left (f x +e \right )\right )-2 \sqrt {a}\, \sqrt {-b \left (\cos ^{4}\left (f x +e \right )\right )+\left (a +b \right ) \left (\cos ^{2}\left (f x +e \right )\right )}-a -b}{\cos ^{2}\left (f x +e \right )-1}\right )\right )}{2 \cos \left (f x +e \right ) \sqrt {a +b \left (\sin ^{2}\left (f x +e \right )\right )}\, f}\) | \(174\) |
1/2*(cos(f*x+e)^2*(a+b*sin(f*x+e)^2))^(1/2)*(b^(1/2)*arctan(1/2*(-2*b*cos( f*x+e)^2+a+b)/b^(1/2)/(-b*cos(f*x+e)^4+(a+b)*cos(f*x+e)^2)^(1/2))-a^(1/2)* ln((-(a-b)*cos(f*x+e)^2-2*a^(1/2)*(-b*cos(f*x+e)^4+(a+b)*cos(f*x+e)^2)^(1/ 2)-a-b)/(cos(f*x+e)^2-1)))/cos(f*x+e)/(a+b*sin(f*x+e)^2)^(1/2)/f
Leaf count of result is larger than twice the leaf count of optimal. 207 vs. \(2 (71) = 142\).
Time = 0.48 (sec) , antiderivative size = 1158, normalized size of antiderivative = 13.95 \[ \int \csc (e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx=\text {Too large to display} \]
[1/8*(sqrt(-b)*log(128*b^4*cos(f*x + e)^8 - 256*(a*b^3 + b^4)*cos(f*x + e) ^6 + 160*(a^2*b^2 + 2*a*b^3 + b^4)*cos(f*x + e)^4 + a^4 + 4*a^3*b + 6*a^2* b^2 + 4*a*b^3 + b^4 - 32*(a^3*b + 3*a^2*b^2 + 3*a*b^3 + b^4)*cos(f*x + e)^ 2 - 8*(16*b^3*cos(f*x + e)^7 - 24*(a*b^2 + b^3)*cos(f*x + e)^5 + 10*(a^2*b + 2*a*b^2 + b^3)*cos(f*x + e)^3 - (a^3 + 3*a^2*b + 3*a*b^2 + b^3)*cos(f*x + e))*sqrt(-b*cos(f*x + e)^2 + a + b)*sqrt(-b)) + 2*sqrt(a)*log(2*((a^2 - 6*a*b + b^2)*cos(f*x + e)^4 + 2*(3*a^2 + 2*a*b - b^2)*cos(f*x + e)^2 - 4* ((a - b)*cos(f*x + e)^3 + (a + b)*cos(f*x + e))*sqrt(-b*cos(f*x + e)^2 + a + b)*sqrt(a) + a^2 + 2*a*b + b^2)/(cos(f*x + e)^4 - 2*cos(f*x + e)^2 + 1) ))/f, 1/8*(4*sqrt(-a)*arctan(-1/2*((a - b)*cos(f*x + e)^2 + a + b)*sqrt(-b *cos(f*x + e)^2 + a + b)*sqrt(-a)/(a*b*cos(f*x + e)^3 - (a^2 + a*b)*cos(f* x + e))) + sqrt(-b)*log(128*b^4*cos(f*x + e)^8 - 256*(a*b^3 + b^4)*cos(f*x + e)^6 + 160*(a^2*b^2 + 2*a*b^3 + b^4)*cos(f*x + e)^4 + a^4 + 4*a^3*b + 6 *a^2*b^2 + 4*a*b^3 + b^4 - 32*(a^3*b + 3*a^2*b^2 + 3*a*b^3 + b^4)*cos(f*x + e)^2 - 8*(16*b^3*cos(f*x + e)^7 - 24*(a*b^2 + b^3)*cos(f*x + e)^5 + 10*( a^2*b + 2*a*b^2 + b^3)*cos(f*x + e)^3 - (a^3 + 3*a^2*b + 3*a*b^2 + b^3)*co s(f*x + e))*sqrt(-b*cos(f*x + e)^2 + a + b)*sqrt(-b)))/f, 1/4*(sqrt(b)*arc tan(1/4*(8*b^2*cos(f*x + e)^4 - 8*(a*b + b^2)*cos(f*x + e)^2 + a^2 + 2*a*b + b^2)*sqrt(-b*cos(f*x + e)^2 + a + b)*sqrt(b)/(2*b^3*cos(f*x + e)^5 - 3* (a*b^2 + b^3)*cos(f*x + e)^3 + (a^2*b + 2*a*b^2 + b^3)*cos(f*x + e))) +...
\[ \int \csc (e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx=\int \sqrt {a + b \sin ^{2}{\left (e + f x \right )}} \csc {\left (e + f x \right )}\, dx \]
Time = 0.33 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.59 \[ \int \csc (e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx=-\frac {2 \, \sqrt {b} \arcsin \left (\frac {b \cos \left (f x + e\right )}{\sqrt {a b + b^{2}}}\right ) + \sqrt {a} \log \left (b - \frac {\sqrt {-b \cos \left (f x + e\right )^{2} + a + b} \sqrt {a}}{\cos \left (f x + e\right ) - 1} - \frac {a}{\cos \left (f x + e\right ) - 1}\right ) - \sqrt {a} \log \left (-b + \frac {\sqrt {-b \cos \left (f x + e\right )^{2} + a + b} \sqrt {a}}{\cos \left (f x + e\right ) + 1} + \frac {a}{\cos \left (f x + e\right ) + 1}\right )}{2 \, f} \]
-1/2*(2*sqrt(b)*arcsin(b*cos(f*x + e)/sqrt(a*b + b^2)) + sqrt(a)*log(b - s qrt(-b*cos(f*x + e)^2 + a + b)*sqrt(a)/(cos(f*x + e) - 1) - a/(cos(f*x + e ) - 1)) - sqrt(a)*log(-b + sqrt(-b*cos(f*x + e)^2 + a + b)*sqrt(a)/(cos(f* x + e) + 1) + a/(cos(f*x + e) + 1)))/f
Exception generated. \[ \int \csc (e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx=\text {Exception raised: TypeError} \]
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Error: Bad Argument Type
Timed out. \[ \int \csc (e+f x) \sqrt {a+b \sin ^2(e+f x)} \, dx=\int \frac {\sqrt {b\,{\sin \left (e+f\,x\right )}^2+a}}{\sin \left (e+f\,x\right )} \,d x \]